<%--
  Created by IntelliJ IDEA.
  User: Sky
  Date: 2019/4/10
  Time: 11:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=1, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="${pageContext.request.contextPath}/images/fiveite.ico">

    <title>人流量检测系统</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/my_animation.css" type="text/css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/components.css" type="text/css"/>
    <link href="https://at.alicdn.com/t/font_1126822_bheq7e6ga8.css" rel="stylesheet">
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" type="text/css"
          href="https://cdn.datatables.net/1.10.18/css/dataTables.bootstrap4.min.css"/>
    <style type="text/css">
        #mytable tr td {
            height: 40px;
            padding-top: 0;
            padding-bottom: 0;
            line-height: 40px;
            text-align: center;
        }
    </style>
</head>

<body>
<div class="modal fade" id="operateAcc" tabindex="-1" role="dialog" aria-labelledby="operateAcc" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="operateAccTitle">更换账号</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div id="operateAccBody" class="modal-body">
                <div class="row">
                    <div class="col-8">
                        <div class="accItem nowAcc" id="nowAcc"></div>
                        <div class="accItem addAcc" id="addAcc">
                            <div class="input-group addInput">
                                <div class="input-group-prepend">
                                    <span class="input-group-text iconfont">&#xe634;</span>
                                </div>
                                <input type="text" id="account" class="form-control" onblur="" placeholder="账号"
                                       aria-label="Username" aria-describedby="addon-wrapping">
                            </div>
                            <div class="input-group addInput">
                                <div class="input-group-prepend">
                                    <span class="input-group-text iconfont">&#xe63e;</span>
                                </div>
                                <input type="password" id="password" class="form-control" placeholder="密码"
                                       aria-label="Username" aria-describedby="addon-wrapping">
                            </div>
                        </div>
                    </div>
                    <div class="col-4">
                        <div class="emptyCheckDiv"></div>
                        <div class="accCheck">没有该账号</div>
                        <div class="pwdCheck">密码错误</div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="universalBtn secondary" data-dismiss="modal">取消</button>
                <button type="button" id="change" class="universalBtn primary" disabled>确认更换</button>
            </div>
        </div>
    </div>
</div>
<div id="bg">
    <div id="lg_nav" class="lg_nav hidden-sm fixed-top colorBg">
        <div id="lg_nav_buttom">
            <a href="${pageContext.request.contextPath}/default" class="lg_nav_item">
                <p class="logo unAbleSelect"><i class="iconfont">&#xe630;</i> <span id="logo" class="logoico">人流量预警云平台</span></p>
            </a>
            <a href="${pageContext.request.contextPath}/realtime" class="lg_nav_item bk_hover">实时预警</a>
            <a href="${pageContext.request.contextPath}/history" class="lg_nav_item bk_hover">历史记录</a>
            <a href="javascript:void(0)" id="admin" class="lg_nav_item bk_hover bk_active adminBtn hide">管理员<label class=""></label></a>
            <a href="${pageContext.request.contextPath}/setting" class="lg_nav_item bk_hover">设置</a>
            <div id="headerFeild" class="lg_nav_item">
                <div class="headerTop head_hover bk_active">
                    <span id="nickname">正在加载</span>
                </div>
                <div class="accSet colorBg">
                    <ul>
                        <li id="changeAcc">更换账号</li>
                        <li><a href="${pageContext.request.contextPath}/">退出账号</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="default_layout">
        <div class="grad interval"></div>
    </div>
</div>
<div class="m_layout locationSetting_layout">
    <div class="side_layout setting_side">
        <div class="sideFixedFeild unAbleSelect">
            <a href="${pageContext.request.contextPath}/admin/handler"><div class="settingOption">账号审核</div></a>
            <a href="javascript:void(0)"><div class="settingOption optionActive">账号列表</div></a>
            <a href="${pageContext.request.contextPath}/admin/setting"><div class="settingOption">审核设置</div></a>
        </div>
    </div>
    <div class="main_layout dataSetting_container">
        <div class="apply">
            <div class="applyHead">
                <div class="one">ID</div>
                <div class="two">账号</div>
                <div class="three">账号名</div>
                <div class="four">真实姓名</div>
                <div class="five">身份证号</div>
                <div class="six">身份</div>
            </div>
            <div class="applyBody">
                <div class="bodySandwich">

                </div>
            </div>
        </div>
    </div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
        integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
        crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
        integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
        crossorigin="anonymous" async></script>
<script type="text/javascript" charset="utf8"
        src="https://cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.18/js/dataTables.bootstrap4.min.js"></script>
<script src="${pageContext.request.contextPath}/js/jQuery.md5.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.cookie.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.lazyload.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/public.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        cookiesAuth();
        (function(){
            $.miniAjax("${pageContext.request.contextPath}/api/checkUser",function (data) {
                let msg="";
                if(data.length>0){
                    for (let item of data){
                        msg+="<div class='applyItem'>\n" +
                            "<div class='one'>"+item.id+"</div>\n" +
                            "<div class='two'>"+item.account+"</div>\n" +
                            "<div class='three'>"+item.name+"</div>\n" +
                            "<div class='four'>"+(item.realname===null?"未填写":item.realname)+"</div>\n" +
                            "<div class='five'>"+(item.cardnum===null?"未填写":item.cardnum)+"</div>\n" +
                            "<div class='six'>"+(item.identifier===1?"管理员":"普通")+"</div></div>"
                    }
                }else {
                    msg+="<div class='applyItem'><div class='two'>目前没有待批准账号</div></div>"
                }
                $(".bodySandwich").html(msg);
            });
        })();
    });
</script>
</body>
</html>